package ru.study.thinkin.chapter11;



public class StackTest {
	
	public static void main(String[] args) {
		Stack <String> stack = new Stack <String>();
		for(String s : "My Dog has legs".split(" ")) {
			stack.push(s);			
		}
		while(!stack.empty()) {
			System.out.println(stack.pop());
		}		
		
	}

}
